package com.ruoyi.finance.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 汇率管理对象 e_rate
 *
 * @author ruoyi
 * @date 2024-11-26
 */
public class ERate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Integer id;

    /** 当日基准汇率 */
    @Excel(name = "当日基准汇率")
    private BigDecimal baseExchangeRate;

    /** 系统计算汇率 */
    @Excel(name = "系统计算汇率")
    private BigDecimal calculatedExchangeRate;

    /** 系统汇率公式 */
    @Excel(name = "系统汇率公式")
    private String exchangeRateFormula;

    /** 有效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validTime;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 备注 */
    @Excel(name = "备注")
    private String remarks;

    /** 汇率详情记录外键 */
    @Excel(name = "汇率详情记录外键")
    private Integer did;
    @TableField(exist = false)
    private Integer tradingCurrency;
    @TableField(exist = false)
    private String tradingCurrencyUnit;
    @TableField(exist = false)
    private String baseCurrency;
    @TableField(exist = false)
    private BigDecimal buyingPrice;
    @TableField(exist = false)
    private BigDecimal sellingPrice;
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss",timezone = "Asia/Shanghai")
    private Date releaseTime;

    public Integer getTradingCurrency() {
        return tradingCurrency;
    }

    public void setTradingCurrency(Integer tradingCurrency) {
        this.tradingCurrency = tradingCurrency;
    }

    public String getTradingCurrencyUnit() {
        return tradingCurrencyUnit;
    }

    public void setTradingCurrencyUnit(String tradingCurrencyUnit) {
        this.tradingCurrencyUnit = tradingCurrencyUnit;
    }

    public String getBaseCurrency() {
        return baseCurrency;
    }

    public void setBaseCurrency(String baseCurrency) {
        this.baseCurrency = baseCurrency;
    }

    public BigDecimal getBuyingPrice() {
        return buyingPrice;
    }

    public void setBuyingPrice(BigDecimal buyingPrice) {
        this.buyingPrice = buyingPrice;
    }

    public BigDecimal getSellingPrice() {
        return sellingPrice;
    }

    public void setSellingPrice(BigDecimal sellingPrice) {
        this.sellingPrice = sellingPrice;
    }

    public Date getReleaseTime() {
        return releaseTime;
    }

    public void setReleaseTime(Date releaseTime) {
        this.releaseTime = releaseTime;
    }

    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }
    public void setBaseExchangeRate(BigDecimal baseExchangeRate)
    {
        this.baseExchangeRate = baseExchangeRate;
    }

    public BigDecimal getBaseExchangeRate()
    {
        return baseExchangeRate;
    }
    public void setCalculatedExchangeRate(BigDecimal calculatedExchangeRate)
    {
        this.calculatedExchangeRate = calculatedExchangeRate;
    }

    public BigDecimal getCalculatedExchangeRate()
    {
        return calculatedExchangeRate;
    }
    public void setExchangeRateFormula(String exchangeRateFormula)
    {
        this.exchangeRateFormula = exchangeRateFormula;
    }

    public String getExchangeRateFormula()
    {
        return exchangeRateFormula;
    }
    public void setValidTime(Date validTime)
    {
        this.validTime = validTime;
    }

    public Date getValidTime()
    {
        return validTime;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }

    public String getRemarks()
    {
        return remarks;
    }
    public void setDid(Integer did)
    {
        this.did = did;
    }

    public Integer getDid()
    {
        return did;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("baseExchangeRate", getBaseExchangeRate())
            .append("calculatedExchangeRate", getCalculatedExchangeRate())
            .append("exchangeRateFormula", getExchangeRateFormula())
            .append("validTime", getValidTime())
            .append("status", getStatus())
            .append("remarks", getRemarks())
            .append("did", getDid())
            .append("tradingCurrency", getTradingCurrency())
            .append("tradingCurrencyUnit", getTradingCurrencyUnit())
            .append("tradingCurrencyUnit", getBaseCurrency())
            .append("baseCurrency", getSellingPrice())
            .append("releaseTime", getReleaseTime())
            .toString();
    }
}
